export default (item, index, _this) => {
  let template = `
  <div style="width:30px;height:30px;position: relative;"  @mouseenter="handelshowWinInfo" @mouseleave="handlehiddenWinInfo">
    <div class='markerPoint'></div>
    <div :class='[{"topContain":showInfo},"mapContainBox"]' v-show = "showInfo"  >
      <div class='mapBoxContant'>
        <div class='cityName'>{{markerData.name}}</div>
        <div class='dataRow'>总数：{{markerData.machine_cnt||0}}台</div>
        <div class='dataRow'>监管：{{markerData.gps_machine_cnt||0}}台</div>
        <div class='dataRow'>在线：{{markerData.today_online_rate||0}}台</div>
        <div class='dataRow'>告警：{{markerData.warn_cnt||0}}台</div>
      </div>
    </div>
  </div>
  `
  return {
    template,
    data() {
      return {
        mapThis: _this,
        markerData: item,
        showInfo: false,
      }
    },
    mounted() {
    },
    methods: {
      // // 鼠标移入
      handelshowWinInfo() {
        this.showInfo = true;
        // console.log("鼠标移入");
      },
      // 鼠标移出
      handlehiddenWinInfo() {
        this.showInfo = false;
        // console.log("鼠标移出");
      },
    }
  }
}